#shelve模块是一个简单的k，v将内存数据通过文化持久化的模块
#可以持久化任何pickle可支持的python数据格式
import shelve

d= shelve.open('shelve_test')
print(d.get('name'))
print(d.get('info'))
print(d.get('date'))

'''d = shelve.open('shelve_test')#打开一个文件
info = {'age':22,'job':'it'}
name = ["alex",'rain','test']
d['name'] = name#持久化列表
d['info'] = name#持久化dict
d['date'] = datetime.datetime.now()
d.close()'''





